from selenium import webdriver
from pom.basepage.basepage import BasePage
import time
from lib.share import css,xpath

class TLoginPage(BasePage):
    loc_username = ('name','username')
    loc_password = ('name','password')
    loc_submit = ('id','submit')

    def login(self,username='jcyrss',password='sdfsdf5%'):
        self.input(self.loc_username,username)
        self.input(self.loc_password,password)
        time.sleep(0.5)
        self.click(self.loc_submit)

if __name__ == '__main__':
    driver = webdriver.Chrome()
    tloginpage = TLoginPage(driver)
    tloginpage.open(tloginpage.t_url)
    tloginpage.login()
    time.sleep(5)
    driver.quit()



